package park;

import java.util.Scanner;

public class J10Retangle {
	
	public static void main(String [] args){
		
		double width = 1.0;
		double height = 1.0;
		double getArea;
		double getPerimeter;
		String color = "white";
		
		Scanner sc = new Scanner(System.in);
		System.out.println("사각형 계산기에 오신걸 환영합니다");
		System.out.println("사각형의 가로 길이를 입력해주세요");
		width = sc.nextDouble();
		System.out.println("사각형의 세로 길이를 입력해주세요");
		height = sc.nextDouble();
		
		getArea = getArea(width , height);
		getPerimeter = getPerimeter(width , height);
		
		System.out.println("사격형의 넓이는"+getArea+"입니다");
		System.out.println("사격형의 둘레는"+getPerimeter+"입니다");
		
	}

	private static double getPerimeter(double width , double height) {
		
		return (width + height) * 2 ;
	}

	private static double getArea(double width , double height) {
	
		return (width * height);
	}

}
